package com.kly.user.enums;

public enum Interests {

    SING(1, "唱"),

    DANCE(2, "跳"),

    RAP(3, "rap"),

    BASKETBALL(4, "篮球");
    private final int type;

    private final String description;


    Interests(int type, String description) {
        this.type = type;
        this.description = description;
    }

    public int getType() {
        return type;
    }

    public String getDescription() {
        return description;
    }

    public static Interests fromType(int type) {
        for (Interests interests : values()) {
            if (interests.getType() == type) {
                return interests;
            }
        }
        throw new IllegalArgumentException("Invalid Interests type: " + type);
    }
}
